//
// Created by HuangWenKe on 2020-02-05.
//

#include <iostream>
#include <vector>

using namespace std;

struct point{
    int x;
    int y;
};

bool exist(int x, int y,vector<point> xy){
    for(int i=0;i<xy.size();i++){
        if(xy[i].x==x && xy[i].y==y)
            return true;
    }
    return false;
}

int main(){
    int n;
    cin>>n;
    int m=n;
    int rating[5]={0};
    vector<point>xy;
    while (m){
        point t;
        cin>>t.x>>t.y;
        xy.push_back(t);
        m--;
    }

    for (int i = 0; i < n; i++) {
        int X = xy[i].x;
        int Y = xy[i].y;
        if (exist(X,Y+1,xy) && exist(X,Y-1,xy) && exist(X-1,Y,xy) && exist(X+1,Y,xy)){
            int count=0;
            if (exist(X-1,Y+1,xy))count++;
            if (exist(X-1,Y-1,xy))count++;
            if (exist(X+1,Y+1,xy))count++;
            if (exist(X+1,Y-1,xy))count++;
            rating[count]++;

        }
    }
    for (int j = 0; j < 5; ++j) {
        cout<<rating[j]<<endl;
    }
}